home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / util / misc / morecli1.lha / rearc < prev    next >
Text File  |  1993-12-15  |  1KB  |  51 lines

  1. ; $VER: rearc 1.2 (15-Dec-93)
  2. ; Script to convert ZOO, ARJ and LHARC archives into LHA archives. Handy
  3. ; for BBSs. It _does_ work - I've redone 50Mb of assorted archives with this!
  4. ; This script uses some of the funny things in the 2.04 shell. You really
  5. ; need to understand the tricks to use the commands properly!
  6.  
  7. .key Archive/A
  8. .bra [
  9. .ket ]
  10.  
  11. set fullname `fullpath "[Archive]"`
  12. set ext `extpart "$fullname"`
  13. set stem `stempart "$fullname"`
  14. set cd `cd`
  15.  
  16. if exists ram:temp
  17.   delete ram:temp all force quiet
  18. endif
  19. makedir ram:temp
  20. cd ram:temp
  21.  
  22. set archiver ""
  23.  
  24. if $ext eq .zoo
  25.   set archiver "zoo x//"
  26. endif
  27.  
  28. if $ext eq .arj
  29.   set archiver "unarj x"
  30. endif
  31.  
  32. if $ext eq .lzh
  33.   set archiver "lha -r x"
  34. endif
  35.  
  36. if "$archiver" eq ""
  37.   echo "$fullname is not a recognised archive"
  38. else
  39. ; delete "$stem.lha"
  40.   echo "Depacking from $stem$ext"
  41.   $archiver "$stem"
  42.   echo "Repacking to $stem.lha"
  43.   lha -r a "$stem.lha"
  44.   filenote "$stem.lha" "`list "$fullname" lformat "%C"`"
  45.   setdate "$stem.lha" `list dates "$fullname" lformat "%D %T"`
  46.   delete "$stem$ext"
  47. endif
  48.  
  49. cd "$cd"
  50. delete ram:temp all force quiet
  51.